package com.dly.blog.domain.vo.comment;

import com.dly.blog.meta.MetaObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Schema(name = "CommentVO", description = "评论返回对象")
@EqualsAndHashCode(callSuper = true)
public class CommentPageVO extends MetaObject {

    private String id;

    @Schema(description = "文章id")
    private String contentId;

    @Schema(description = "父节点")
    private String parentId;

    @Schema(description = "评论内容")
    private String comment;

    @Schema(description = "回复人")
    private String replyId;

    @Schema(description = "图片列表")
    private String images;

    @Schema(description = "创建人名称")
    private String createUserName;

    @Schema(description = "回复人名称")
    private String replyName;

    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "点赞次数")
    private Integer kudosNum;

    @Schema(description = "是否点赞")
    private boolean isSupport;

    @Schema(description = "子评论")
    private List<CommentPageVO> sonComment;

    @Schema(description = "子评论的总条数")
    private Integer sonCount;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "创建人")
    private String createUser;
}
